<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <a href="https://www.baidu.com" title = "挺好">百度一下</a>
    <input type="checkbox" >
    <div index = ""></div>


    <script src="./jquery.min.js"></script>
    <script>
        $(function () {
            //element.prop 获取或修改属性名
            $("a").prop("title","我们都挺好");

            //element.change 监测状态
            $("input").change(function(){
                console.log($(this).prop("checked"));
            })

            //element.attr 修改自定义属性
            $("div").attr("index",5);

            //element.data 数据缓冲
            $("div").data("uname","andy");
            console.log($("div").data("uname"));
        })
    </script>
</body>
</html>